<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>

    //
//    var num = 1.4;
    var num = -0.6;

    console.log(Math.abs(num));        //取绝对值
    console.log(Math.floor(num));      //向下取整      //向小取
    console.log(Math.ceil(num));       //向上取整      //向大取
    console.log(Math.round(num));      //四舍五入取整   //正数四舍五入，负数五舍六入
    console.log(Math.random());        //随机数0-1





</script>
</body>
</html>